home *** CD-ROM | disk | FTP | other *** search
/ Shareware Super Platinum 8 / Shareware Super Platinum 8.iso / mac / PROGTOOL / LIB211.ZIP;1 / MUSCLICK.TXT < prev    next >
Encoding:
Text File  |  1993-12-14  |  6.1 KB  |  124 lines

  1. ------------------------------------------------------------------------
  2.                                   MusClick.TXT
  3.           The documentation below is for the .BIN file: MUSCLICK.BIN
  4.           and is taken from the header for MusClick.ASM.
  5. ------------------------------------------------------------------------
  6.        Programmers:    Jay Parsons (Jparsons)
  7.                        and Ken Chan (HazMatZak)
  8.        Inspiration:    Bowen Moursund (Bowen)
  9.                        and the folks at BORBBS
  10.        Date:           July 6, 1992
  11.        Version:        1.1
  12.  
  13.        NOTE: This can be downloaded with it's .ASM file from
  14.        the DBASE forum on CompuServe, Library 4, as MCLICK.ZIP.
  15.  
  16.       dBASE usage syntax, after LOAD musclick:
  17.  
  18.       cSuccess = call( "MUSCLICK", "I", [<arg2>] ) && install
  19.       cSuccess = call( "MUSCLICK", "U" )           && uninstall
  20.  
  21.       store chr( 255 ) TO cMRow, cMCol
  22.       call MUSCLICK with cMRow, cMCol              && report row, col
  23.       nMRow = asc( cMRow )
  24.       nMCol = asc( cMCol )
  25.  
  26.      A call with "I" must be made to install the alternate mouse
  27.      event handler for this to work.  After that call, this .bin
  28.      will push a Ctrl-PgUp, or the character specified in the optional
  29.      <arg2> argument to the "I" call, into the BIOS buffer when
  30.      the left mouse button is released.  The <arg2> character must be
  31.      a chr() value from 1 to 254, or the argument may be a string
  32.      composed of two chr() values, the first of which is chr(255) and
  33.      the second of which is the chr() value of the second (high) byte
  34.      of an extended code for a key or key combination that has no
  35.      ASCII value.
  36.  
  37.      For example, a call with a second argument of chr(255) + chr(97)
  38.      will stuff Ctrl-F4.  It is likely that you will want to use a
  39.      key or key combination that has an inkey() and that works with
  40.      ON KEY.  Note that the extended codes are always positive
  41.      and not always the same as the inkey() values.
  42.  
  43.     The installation call will return "T" if successful, and "F" if not.
  44.  
  45.     If the BIOS buffer happens to be full when the mouse button is
  46.     released, the click will go unreported, but the row and column
  47.     will be updated.
  48.  
  49.     If you wish a default character different from Ctrl-PgUp, change
  50.     the DEFAULTKEY value before assembly.  For an extended code,
  51.     set it to the value of the second byte * 256 (100h).  The ESC key
  52.     is the only key that will attract dBASE's attention in the middle
  53.     of a dBASE operation such as "LIST" or "INDEX".  However, that
  54.     operation will be cancelled if ESC is pressed, so consider what is
  55.     going on and whether you want to have it recognize a click.
  56.  
  57.     Calls to get the row and column must have the first argument
  58.     be chr(255), and must have a second argument.  Both MUST be 
  59.     variables. A call to find the row and column if no "I" call has 
  60.     been made, or no clicks have occurred, will return chr(255) for 
  61.     each. The row and column reported are those as of the last click, 
  62.     which are not necessarily those current at the time of the call.  
  63.     They are determined by dividing the values in pixels reported by 
  64.     the mouse by 8 each and ignoring any remainder.
  65.  
  66.     After one call has been made to get the mouse row and column,
  67.     subsequent calls to get the row and column will return chr(254) for
  68.     each if no click has occurred since the previous call.  This allows
  69.     the dBASE program to differentiate between actual keypresses
  70.     and "keypresses" made by this routine to report mouse clicks.
  71.  
  72.     The recommended way to test for an actual mouse click is to see if 
  73.     the row value returned is below 200; all row values 200 and above 
  74.     are reserved for future expansion (only 254 and 255 are currently 
  75.     used). 
  76.  
  77.     A call with "U" should be made to uninstall the alternate event
  78.     handler before installing it with a different key, and also 
  79.     before ending the dBASE program for safety.  Repeated calls to 
  80.     install the handler without uninstalling it will overwrite the 
  81.     address of the dBASE handler and prevent restoring it.
  82.  
  83.     The dBASE mouse-event handler is disabled while the one in this
  84.     .bin is installed.  Consequently, dBASE will not know of the
  85.     current mouse position or click status, and calls to the .bins
  86.     in the recent Technotes article, uploaded as MOUSE_FU.TXT, will
  87.     not return correct information.  Use this .bin or those, but not
  88.     both at once.
  89.  
  90.             Following are as specified by Microsoft for its mouse:
  91.  
  92.     Register usage on call of an alternate event handler
  93.  
  94.             AX = condition mask ( bits 0-4 set for events occurred )
  95.             BX = button state   ( bit 0 set if left button pressed;
  96.                                   bit 1 if right; bit 2, center.) 
  97.               <unused>
  98.             CX = horizontal mouse cursor coordinate in pixels
  99.             DX = vertical    "     "        "        "   "
  100.             SI = last horizontal mickey count ( vertical? )   <unused>
  101.             DI = last vertical mickey count   ( horizontal? ) <unused>
  102.             DS = mouse driver data segment <unused>
  103.  
  104.     Event mask bits, 1 to respond to that event:
  105.              0 = mouse has moved       ( value  1 )
  106.              1 = left button pressed   ( value  2 )
  107.              2 = left button released  ( value  4 )
  108.              3 = right button pressed  ( value  8 )
  109.              4 = right button released ( value 16 )
  110.  
  111.     Thus, if our handler were to be called whenever the mouse moved
  112.     or either button were released, the mask would be 10101, or
  113.     16 + 4 + 1, decimal value 21, rather than the 4 we use because
  114.     we care only about release of the left button.
  115.  
  116.     If an event not specified in our event mask occurs, our handler
  117.     will not be called at all.  If the left button is released, it
  118.     will be called.  AX, the condition mask, will report all events
  119.     that have occurred, not only the one specified in the event mask.
  120.  
  121. ------------------------------------------------------------------------
  122. End of File: MUSCLICK.TXT
  123. ------------------------------------------------------------------------
  124.